package com.api.core.service.impl;

import com.api.core.domain.query.IpcQuery;
import com.api.core.domain.query.IpcTreeQuery;
import com.api.core.domain.vo.IpcVo;
import com.api.core.mapper.IpcMapper;
import com.api.core.service.IiPcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IpcServiceImpl implements IiPcService {
    @Autowired
    private IpcMapper ipcMapper;

    @Override
    public IpcVo create(IpcVo vo) {
        ipcMapper.create(vo);
        return vo;
    }

    @Override
    public void modify(IpcVo vo) {
        ipcMapper.modify(vo);
    }

    @Override
    public void delete(IpcVo vo) {
        ipcMapper.delete(vo.getIpcCode());
    }

    @Override
    public IpcQuery search(IpcVo vo) {
        return ipcMapper.item(vo.getIpcCode());
    }



    @Override
    public List<IpcQuery> searchList(IpcVo vo) {
        return ipcMapper.list(vo);
    }

    @Override
    public List<IpcTreeQuery> tree(IpcVo vo) {
        return ipcMapper.tree(vo);
    }
}
